// 1. 从redux包里面引入一个方法 createStore()
import { applyMiddleware, createStore } from 'redux'
// 引入redux-thunk
import thunk from 'redux-thunk'
// 引入reducer
import reducer from './reducer'
// 2. 创建store对象
const store = createStore(reducer, applyMiddleware(thunk))
// dispatch -->中间件1 --> 中间件2 --> 中间件3--> reducer
// const store = createStore(reducer, applyMiddleware(中间件1,中间件2,中间件3))

export default store
